using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class biomecMap : EntityTypeConfiguration<biomec>
    {
        public biomecMap()
        {
            // Primary Key
            this.HasKey(t => t.bio_id);

            // Properties
            this.Property(t => t.ref_point1)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_mat1)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_tech1)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.ref_point2)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_mat2)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_tech2)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.ref_point3)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_mat3)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_tech3)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.ref_point4)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_mat4)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.fill_tech4)
                .IsFixedLength()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("biomec");
            this.Property(t => t.bio_id).HasColumnName("bio_id");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.tooth_nb).HasColumnName("tooth_nb");
            this.Property(t => t.canal1).HasColumnName("canal1");
            this.Property(t => t.prov_len1).HasColumnName("prov_len1");
            this.Property(t => t.ref_point1).HasColumnName("ref_point1");
            this.Property(t => t.work_len1).HasColumnName("work_len1");
            this.Property(t => t.size1).HasColumnName("size1");
            this.Property(t => t.fill_mat1).HasColumnName("fill_mat1");
            this.Property(t => t.fill_tech1).HasColumnName("fill_tech1");
            this.Property(t => t.canal2).HasColumnName("canal2");
            this.Property(t => t.prov_len2).HasColumnName("prov_len2");
            this.Property(t => t.ref_point2).HasColumnName("ref_point2");
            this.Property(t => t.work_len2).HasColumnName("work_len2");
            this.Property(t => t.size2).HasColumnName("size2");
            this.Property(t => t.fill_mat2).HasColumnName("fill_mat2");
            this.Property(t => t.fill_tech2).HasColumnName("fill_tech2");
            this.Property(t => t.canal3).HasColumnName("canal3");
            this.Property(t => t.prov_len3).HasColumnName("prov_len3");
            this.Property(t => t.ref_point3).HasColumnName("ref_point3");
            this.Property(t => t.work_len3).HasColumnName("work_len3");
            this.Property(t => t.size3).HasColumnName("size3");
            this.Property(t => t.fill_mat3).HasColumnName("fill_mat3");
            this.Property(t => t.fill_tech3).HasColumnName("fill_tech3");
            this.Property(t => t.pulp_norm).HasColumnName("pulp_norm");
            this.Property(t => t.pulp_hyper).HasColumnName("pulp_hyper");
            this.Property(t => t.pulp_rever).HasColumnName("pulp_rever");
            this.Property(t => t.pulp_irrev).HasColumnName("pulp_irrev");
            this.Property(t => t.pulp_nec).HasColumnName("pulp_nec");
            this.Property(t => t.pulp_resor).HasColumnName("pulp_resor");
            this.Property(t => t.peri_norm).HasColumnName("peri_norm");
            this.Property(t => t.peri_chron).HasColumnName("peri_chron");
            this.Property(t => t.peri_acute).HasColumnName("peri_acute");
            this.Property(t => t.peri_other).HasColumnName("peri_other");
            this.Property(t => t.summary).HasColumnName("summary");
            this.Property(t => t.tooth_vita).HasColumnName("tooth_vita");
            this.Property(t => t.par).HasColumnName("par");
            this.Property(t => t.crow_build).HasColumnName("crow_build");
            this.Property(t => t.apexif).HasColumnName("apexif");
            this.Property(t => t.pulpotomy).HasColumnName("pulpotomy");
            this.Property(t => t.non_surgic).HasColumnName("non_surgic");
            this.Property(t => t.surgic_end).HasColumnName("surgic_end");
            this.Property(t => t.post_endo).HasColumnName("post_endo");
            this.Property(t => t.canal4).HasColumnName("canal4");
            this.Property(t => t.prov_len4).HasColumnName("prov_len4");
            this.Property(t => t.ref_point4).HasColumnName("ref_point4");
            this.Property(t => t.work_len4).HasColumnName("work_len4");
            this.Property(t => t.size4).HasColumnName("size4");
            this.Property(t => t.fill_mat4).HasColumnName("fill_mat4");
            this.Property(t => t.fill_tech4).HasColumnName("fill_tech4");
        }
    }
}
